<template>
  <div class="theme">
    <subTable :table-data="tableData" :table-label="tableLabel">
      <el-table-column align="left" label="名称" slot="first">
        <template slot-scope="scope">
          <img alt="" src="@/assets/404_images/tupian.png" srcset="">
          <span style="position:absolute;right:157px;font-size:14px;">秋意浓</span>
        </template>
      </el-table-column>
      <el-table-column align="center" label="操作" slot="button">
        <template slot-scope="scope">
          <el-button v-if="scope.row.isClick === true" @click="handleClick(scope)" icon="el-icon-circle-check" type="primary">使用</el-button>
          <el-button v-if="scope.row.isClick === false" icon="el-icon-circle-check" type="text" disabled>使用中</el-button>
          <el-button v-if="scope.row.isClick === false" @click="goAddPage" icon="el-icon-circle-check" type="primary">管理</el-button>
        </template>
      </el-table-column>
    </subTable>
  </div>
</template>

<script>
  import subTable from '@/components/Eltable'

  export default {
    components: {
      subTable
    },
    data() {
      return {
        shiyong: false,
        tableLabel: [
          {
            label: '主题版本',
            prop: 'theme'
          },
          {
            label: '作者',
            prop: 'author'
          }
        ],
        tableData: [
          {
            theme: '1.0',
            author: '张',
            isopera: true,
            isClick: false
          }
        ],

      }
    },
    methods:{
      handleClick(scope) {
        scope.row.isClick = true
      },
      goAddPage() {
        this.$router.push('/system/add-zhuti')
      }
    }
  }
</script>

<style lang="scss" scoped>
  .theme {
  }
</style>
